import React, {Component} from 'react';
import {browserHistory} from 'react-router'
import {Router, Redirect, Route, hashHistory} from 'react-router';
import {HostPost} from '../ajax'
import Login from '../Login';
import App from '../App';
import Admin_app from '../adminComponent/Admin_app';
import TestA from '../TestA';
import UserAdd from '../pages/UserAdd';
import UserPage from '../pages/UserPage';
import Home from '../pages/Home';
import MyFetch from '../api/MyFetch';
import Register from '../Register';
import IndexPage from '../component/IndexPage';
import CmtList from '../component/CmtList_test';
// import ShowPDF from '../component/ShowPDF';
import news_one from '../news/News_one';
import news_two from '../news/news_two';
import news_three from '../news/news_three';
import news_four from '../news/news_four';
import news_five from '../news/news_five';
import Questionnaire from '../component/Questionnaire';
import Survey1 from '../survey/Survey1';
import Survey2 from '../survey/Survey2';
import Survey3 from '../survey/Survey3';
import Survey4 from '../survey/Survey4';
import Survey5 from '../survey/Survey5';
import Survey6 from '../survey/Survey6';
import Survey7 from '../survey/Survey7';
import Survey8 from '../survey/Survey8';
import ArticleHome from '../article/home/home';
import Pro_Case_Search from '../component/pro_caseSearch/Pro_Case_search';
import MessageBoard from "../messageBoard/MessageBoard";
import MessageDetail from "../messageBoard/MessageDetail"
import researchGroup1 from "../adminComponent/search/ResearchGroup1"
import researchGroup2 from "../adminComponent/search/ResearchGroup2"
import researchGroup3 from "../adminComponent/search/ResearchGroup3"
import researchGroup4 from "../adminComponent/search/ResearchGroup4"
import researchGroup5 from "../adminComponent/search/ResearchGroup5"
import researchGroup7 from "../adminComponent/search/ResearchGroup7"
import researchGroup8 from "../adminComponent/search/ResearchGroup8"

import {projectRoot} from "../../src/constant/Constant"


export default class SRoute extends Component {


    render() {

        return (
            <Router history={browserHistory}>
                <Route path="/" component={App}/>
                <Route path="/login" component={Login}>
                    <Route path="/login/A" component={TestA}/>
                </Route>
                <Route path="/news_one" component={news_one}/>
                <Route path="/news_two" component={news_two}/>
                <Route path="/news_three" component={news_three}/>
                <Route path="/news_four" component={news_four}/>
                <Route path="/news_five" component={news_five}/>
                <Route path="/Questionnaire" component={Questionnaire}/>
                <Route path="/user/page" component={UserPage}/>
                <Route path="/indexpage" component={IndexPage}/>
                <Route path="/reg" component={Register}/>
                <Route path="/user/" component={Home}/>
                <Route path="/user/add" component={UserAdd}/>
                <Route path="/fetch" component={MyFetch}/>
                <Route path="/!" component={TestA}/>
                <Route path="/user/home" component={Admin_app}/>
                <Route path="/article" component={ArticleHome}/>
                <Route path="/survey/survey1" component={Survey1}/>
                <Route path="/survey/survey2" component={Survey2}/>
                <Route path="/survey/survey3" component={Survey3}/>
                <Route path="/survey/survey4" component={Survey4}/>
                <Route path="/survey/survey5" component={Survey5}/>
                <Route path="/survey/survey6" component={Survey6}/>
                <Route path="/survey/survey7" component={Survey7}/>
                <Route path="/survey/survey8" component={Survey8}/>
                <Route path="/pro_search" component={Pro_Case_Search}/>
                <Route path="/messageBoard" component={MessageBoard}/>
                <Route path="/messageDetail" component={MessageDetail}/>

                <Route path="/researchGroup1" component={researchGroup1}/>
                <Route path="/researchGroup2" component={researchGroup2}/>
                <Route path="/researchGroup3" component={researchGroup3}/>
                <Route path="/researchGroup4" component={researchGroup4}/>
                <Route path="/researchGroup5" component={researchGroup5}/>
                <Route path="/researchGroup7" component={researchGroup7}/>
                <Route path="/researchGroup8" component={researchGroup8}/>

                {/*部署服务器上项目的根路径*/}
                {/*<Route path="build/" component={App}/>*/}
                {/*<Route path="build/login" component={Login}>*/}
                {/*    <Route path="build/login/A" component={TestA} />*/}
                {/*</Route>*/}
                {/*<Route path="build/news_one" component={news_one} />*/}
                {/*<Route path="build/news_two" component={news_two} />*/}
                {/*<Route path="build/news_three" component={news_three} />*/}
                {/*<Route path="build/news_four" component={news_four} />*/}
                {/*<Route path="build/news_five" component={news_five} />*/}
                {/*<Route path="build/Questionnaire" component={Questionnaire} />*/}
                {/*<Route path="build/user/page" component={UserPage} />*/}
                {/*<Route path="build/indexpage" component={IndexPage}/>*/}
                {/*<Route path="build/reg" component={Register}/>*/}
                {/*<Route path="build/user/" component={Home}/>*/}
                {/*<Route path="build/user/add" component={UserAdd}/>*/}
                {/*<Route path="build/fetch" component={MyFetch}/>*/}
                {/*<Route path="build/!" component={TestA}/>*/}
                {/*<Route path="build/user/home" component={Admin_app}/>*/}
                {/*<Route path="build/article" component={ArticleHome}/>*/}
                {/*<Route path="build/survey/survey1" component={Survey1}/>*/}
                {/*<Route path="build/survey/survey2" component={Survey2}/>*/}
                {/*<Route path="build/survey/survey3" component={Survey3}/>*/}
                {/*<Route path="build/survey/survey4" component={Survey4}/>*/}
                {/*<Route path="build/survey/survey5" component={Survey5}/>*/}
                {/*<Route path="build/survey/survey6" component={Survey6}/>*/}
                {/*<Route path="build/survey/survey7" component={Survey7}/>*/}
                {/*<Route path="build/survey/survey8" component={Survey8}/>*/}
                {/*<Route path="build/pro_search" component={Pro_Case_Search}/>*/}
                {/*<Route path="build/messageBoard" component={MessageBoard}/>*/}
                {/*<Route path="build/messageDetail" component={MessageDetail}/>*/}
                {/*<Route path="build/researchGroup1" component={researchGroup1}/>*/}
                {/*<Route path="build/researchGroup2" component={researchGroup2}/>*/}
                {/*<Route path="build/researchGroup3" component={researchGroup3}/>*/}
                {/*<Route path="build/researchGroup4" component={researchGroup4}/>*/}
                {/*<Route path="build/researchGroup5" component={researchGroup5}/>*/}
                {/*<Route path="build/researchGroup7" component={researchGroup7}/>*/}
                {/*<Route path="build/researchGroup8" component={researchGroup8}/>*/}


            </Router>

        )
    }
}
